#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
char* my_strncpy(char* dest, char* src,int count)
{
	char* start = *dest;
	while (count && (*dest++ = *src++))
	{
		count--;
	}
	if (count)
	{
		while (--count)
		{
			*dest++ = '\0';
		}
	}
	return start;
}
int main()
{
	//char arr[10] = "abcdefg";
	//char arr2[] = "bit";
	//my_strncpy(arr, arr2, 4);
	//printf("%s\n", arr);
	char* p1 = "abcdefghi";
	char* p2 = "def";
	char* res = strstr(p1, p2);
	printf("%s\n", res);
	
	return 0;
}